Update Windows CI Zuulv2
This document describes a procedure required to update Windows CI Zuulv2 configuration from contrail-windows-ci repository.
Prerequisites
- Ubuntu 16.04 or Windows Subsystem for Linux with Ubuntu
- It will serve as Ansible control machine
- User's public SSH key installed on Zuulv2 instance
- Please contact Windows CI team
- Access to ansible vault key
- Please contact Windows CI team
Steps
-
Install required
aptdependencies on Ansible control machineapt-get install git python3 python3-pip python3-virtualenv -
Clone
contrail-windows-cirepositorycd ~/ git clone https://github.com/Juniper/contrail-windows-ci.git cd contrail-windows-ci -
Verify that
masterbranch contains PRs with required changes to Zuul configuration-
Assuming
PR#2andPR#1are required PRs, run the following command:git log --oneline -
Output will contain a list of merged PRs, from newest to oldest. Required PRs should be at the top:
abcdabc PR#2 abcd123 PR#1 e8691f5 Some other PR 3af841e Some other PR, part 2 # ... omitted
Example
- Assume that add contrail-infra-doc to gerrit (#212) is a latest PR that was merged and this change has to be applied on Zuul
- Then output of
git logshould look like this:93c783b add contrail-infra-doc to gerrit (#212) 1f86f26 zuul: setup-zuul-server playbook; variables in prod inventory (#210) # ... omitted
-
-
Move to
ansibledirectorycd ansible -
Create a virtualenv and install
pipdependenciespython3 -m virtualenv -p /usr/bin/python3 venv source venv/bin/activate pip install -r python-requirements.txt -
Create a file for Ansible vault key and populate it with the key
touch ~/ansible-vault-key vim ~/ansible-vault-key # enter ansible vault key into a file -
Test connection to Zuul with Ansible
ansible -i inventory.prod --private-key=YOUR_PRIVATE_KEY zuul -m ping- where
YOUR_PRIVATE_KEYis a path to your SSH private key
- where
-
Run
setup-zuul-server.ymlplaybookansible-playbook -i inventory.prod --private-key=YOUR_PRIVATE_KEY setup-zuul-server.ymlVerify that the run completed successfully. The output should be following and
failedtask count must equal zero.# # task list omitted for brevity # PLAY RECAP ******************************************************************************** ********** 10.84.12.75 : ok=22 changed=2 unreachable=0 failed=0 # # ... - task run time omitted for brevity #failedtask count should be equal to zero